package slingge.cooleuropeweather;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Setting extends AppCompatActivity {
    private Button bt;
    private Intent intent;
    private EditText phone,email,name,sign;
    private String EmailNumber,PhoneNumber;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        intent = this.getIntent();
        bt = (Button)findViewById(R.id.button);
        phone = (EditText)findViewById(R.id.phone);
        email = (EditText)findViewById(R.id.email);
        name = (EditText)findViewById(R.id.name);
        sign = (EditText)findViewById(R.id.sign);
        bt.setOnClickListener(new blistener());
    }
    class blistener implements View.OnClickListener {
        @Override
        public void onClick(View v) {
            EmailNumber = email.getText().toString();
            PhoneNumber = phone.getText().toString();
            intent.putExtra("EmailNumber",EmailNumber);
            intent.putExtra("PhoneNumber",PhoneNumber);
            setResult(3,intent);
            finish();
        }
    }
}
